﻿<%@ Page Language="C#" MasterPageFile="~/Template.master" AutoEventWireup="true" CodeFile="ChequeList.aspx.cs" Inherits="ChequeList" Title="Ghasam | Cheque List" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
 <div class="title">
        لیست چکهای دریافتی
 </div>
 <hr />
 <div id="divHiddenCustomers" style="float:right; width:400px; padding-top:15px; padding-bottom:20px;" runat="server">
     <asp:RadioButton ID="rbFormalCustomers" GroupName="rbCustomers" OnCheckedChanged="CustomerTypeCheckedChanged"
         AutoPostBack="true" Text="گروه الف" runat="server" />
     &nbsp;&nbsp;&nbsp;&nbsp;
     <asp:RadioButton ID="rbHiddenCustomers" GroupName="rbCustomers" OnCheckedChanged="CustomerTypeCheckedChanged"
         AutoPostBack="true" Text="گروه ب" runat="server" />
     &nbsp;&nbsp;&nbsp;&nbsp;
     <asp:RadioButton ID="rbAll" GroupName="rbCustomers" Checked="true" AutoPostBack="true"
         Text="همه مشتریان" runat="server" OnCheckedChanged="CustomerTypeCheckedChanged" />
 </div>
 
 
 
 <div style="padding-top:50px;">
 <asp:GridView ID="gvCheques" runat="server" AutoGenerateColumns="False" OnRowDeleted="gvCheques_RowDeleted" AllowSorting="True">
    <Columns>
        <asp:BoundField Visible="False" DataField="PaymentId" />
    
        <asp:TemplateField HeaderText="نام مشترک" SortExpression="CustomerName">
            <ItemTemplate>
                <%# Eval("CustomerName") %>
            </ItemTemplate>
        </asp:TemplateField>        
        
        <asp:TemplateField HeaderText="مبلغ چک" SortExpression="Amount">
            <ItemTemplate>
                <%# Mani.Common.UIHelper.FormatString( Eval("Amount") ) %>
            </ItemTemplate>
        </asp:TemplateField>
        
        <asp:BoundField HeaderText="نام بانک" DataField="BankName" SortExpression="BankName" />
        <asp:BoundField HeaderText="شعبه" DataField="BankBranch" SortExpression="BankBranch" />
        
        <asp:TemplateField HeaderText="تاریخ چک" SortExpression="ChequeDate">
            <ItemTemplate>
                 <%# Mani.Common.MyPersianDate.DateTimeToPersian(Eval("ChequeDate")) %>
            </ItemTemplate>
        </asp:TemplateField>
        
        <asp:TemplateField HeaderText="تاریخ دریافت چک" SortExpression="ReceivedDate">
            <ItemTemplate>
                 <%# Mani.Common.MyPersianDate.DateTimeToPersian(Eval("ReceivedDate")) %>
            </ItemTemplate>
        </asp:TemplateField>
        
        <asp:TemplateField HeaderText="تاریخ پرداخت" SortExpression="PaidDate">
            <ItemTemplate>
                 <%# Mani.Common.MyPersianDate.DateTimeToPersian(Eval("PaidDate")) %>
            </ItemTemplate>
        </asp:TemplateField>
        
        <asp:BoundField HeaderText="پرداخت به" DataField="PaidTo" SortExpression="PaidTo" />
        
        <asp:TemplateField>
            <ItemTemplate>
                <a href='EditCheque.aspx?PaymentId=<%# Eval("PaymentId") %>'>
                   <img src="App_Themes/<%=Page.Theme %>/images/edit.gif" alt="" style="border:0;" />
                </a>
            </ItemTemplate>
        </asp:TemplateField>
        
        <asp:TemplateField>
            <ItemTemplate>
                <asp:LinkButton ID="DeleteCheque" runat="server" CausesValidation="False" CommandName="Delete">
                   <img src="App_Themes/<%=Page.Theme %>/images/delete.gif" alt="" style="border:0;" />
                </asp:LinkButton>
            </ItemTemplate>
        </asp:TemplateField>
    </Columns>
 </asp:GridView>
 </div>
</asp:Content>

